//
//  NSDictionary+log.m
//  XHH_Plist_one
//
//  Created by xiaohuihui on 2016/10/27.
//  Copyright © 2016年 30-陈辉华. All rights reserved.
//

#import "NSDictionary+log.h"

@implementation NSDictionary (log)

- (NSString *)descriptionWithLocale:(id)locale
{
    // 创建可变字符串
    NSMutableString *stringM = [NSMutableString string];
    // 拼接开头
    [stringM appendString:@"{\n"];
    //  遍历出元素,拼接中间的内容部分
    [self enumerateKeysAndObjectsUsingBlock:^(id  _Nonnull key, id  _Nonnull obj, BOOL * _Nonnull stop) {
        [stringM appendFormat:@"\t%@ = %@;\n",key,obj];
    }];
    // 拼接结尾
    [stringM appendString:@"}\n"];
    
    return stringM;
}

@end
